package com.wulian.common.euums;

import lombok.Getter;
import lombok.Setter;

/**
 * 
* @ClassName: MonitorPointEnum 
* @Description: TODO(监测点枚举类) 
* @author 马志豪
* @date 2019年10月16日 下午2:14:56 
*
 */
public enum LocationTypeEnum {
    //位置
	LOCATION_TYPE_ONE("1","出水口"),
	LOCATION_TYPE_TWO("2","进水口"),
	LOCATION_TYPE_THREE("3","其他");
	@Getter
	@Setter
	private String code;
	@Getter
	@Setter
	private String value;
	
	private LocationTypeEnum(String code, String value) {
		this.code = code;
		this.value = value;
	}


	/**
     * 根据code获取去value
     * @param code
     * @return
     */
    public static String getValueByCode(String code){
        for(LocationTypeEnum locationTypeEnum:LocationTypeEnum.values()){
            if(code.equals(locationTypeEnum.getCode())){
                return locationTypeEnum.getValue();
            }
        }
        return  null;
    }
	
}
